<template>
  <div>
    <el-pagination class="pagination" :current-page="pagination.page" :page-sizes="[10, 20, 30, 40]" :page-size="pagination.size" layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  </div>
</template>

<script>
export default {
  props: ['page'],
  data() {
    return {
      pagination: {
        // current: 1,
        // size: 10,
        // total: 100,
      }
    }
  },
  mounted() {
    this.pagination = this.page
    //  this.pagination =this.page
    console.log(this.page)
  },
  methods: {
    handleSizeChange(size) {
      this.pagination.size = size
      this.$emit('pagetionsc', this.pagination)
    },
    // 分页数量
    handleCurrentChange(current) {
      this.pagination.page = current
      this.$emit('pagetionsc', this.pagination)
    }
  }
}
</script>

<style></style>
